#include "object.h"

#ifndef GENESIS_DATATYPES
#define GENESIS_DATATYPES
typedef unsigned char byte;
typedef unsigned short word;
#endif

word* getSpriteTableBuf();
void BuildSprites();
void BuildSprite(object *obj, signed short obX, signed short obY, word* &spriteTableBufferPtr, word &spriteCount, byte oldrender);

void DisplaySprite(object*);

void AnimateSprite(object *obj, byte *AniScriptList[]);

#define id_Walk 0
#define id_Run 1
#define id_Roll 2
#define id_Roll2 3
#define id_Push 4
#define id_Wait 5
#define id_Balance 6
#define id_LookUp 7
#define id_Duck 8
#define id_Warp1 9
#define id_Warp2 0xA
#define id_Warp3 0xB
#define id_Warp4 0xC
#define id_Stop 0xD
#define id_Float1 0xE
#define id_Float2 0xF
#define id_Spring 0x10
#define id_Hang 0x11
#define id_Leap1 0x12
#define id_Leap2 0x13
#define id_Surf 0x14
#define id_GetAir 0x15
#define id_Burnt 0x16
#define id_Drown 0x17
#define id_Death 0x18
#define id_Shrink 0x19
#define id_Hurt 0x1A
#define id_WaterSlide 0x1B
#define id_Null 0x1C
#define id_Float3 0x1D
#define id_Float4 0x1E

#define afEnd 0xFF	//; return to beginning of animation
#define afBack 0xFE	//; go back (specified number) bytes
#define afChange 0xFD	//; run specified animation
#define afRoutine 0xFC	//; increment routine counter
#define afReset 0xFB	//; reset animation and 2nd object routine counter
#define af2ndRoutine 0xFA	//; increment 2nd routine counter
